{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "s = pd.Series([1, 3, 5, np.nan, 6, 8])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0    1.0\n",
       "1    3.0\n",
       "2    5.0\n",
       "3    NaN\n",
       "4    6.0\n",
       "5    8.0\n",
       "dtype: float64"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "one      1\n",
       "two      2\n",
       "three    3\n",
       "dtype: int64"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x = pd.Series([1, 2, 3], index = ['one', 'two', 'three'])\n",
    "x"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "s = pd.Series(np.arange(10000) * -1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "62.9 µs ± 1.45 µs per loop (mean ± std. dev. of 7 runs, 10000 loops each)\n"
     ]
    }
   ],
   "source": [
    "%timeit np.abs(s)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0          0\n",
       "1         -1\n",
       "2         -2\n",
       "3         -3\n",
       "4         -4\n",
       "5         -5\n",
       "6         -6\n",
       "7         -7\n",
       "8         -8\n",
       "9         -9\n",
       "10       -10\n",
       "11       -11\n",
       "12       -12\n",
       "13       -13\n",
       "14       -14\n",
       "15       -15\n",
       "16       -16\n",
       "17       -17\n",
       "18       -18\n",
       "19       -19\n",
       "20       -20\n",
       "21       -21\n",
       "22       -22\n",
       "23       -23\n",
       "24       -24\n",
       "25       -25\n",
       "26       -26\n",
       "27       -27\n",
       "28       -28\n",
       "29       -29\n",
       "        ... \n",
       "9970   -9970\n",
       "9971   -9971\n",
       "9972   -9972\n",
       "9973   -9973\n",
       "9974   -9974\n",
       "9975   -9975\n",
       "9976   -9976\n",
       "9977   -9977\n",
       "9978   -9978\n",
       "9979   -9979\n",
       "9980   -9980\n",
       "9981   -9981\n",
       "9982   -9982\n",
       "9983   -9983\n",
       "9984   -9984\n",
       "9985   -9985\n",
       "9986   -9986\n",
       "9987   -9987\n",
       "9988   -9988\n",
       "9989   -9989\n",
       "9990   -9990\n",
       "9991   -9991\n",
       "9992   -9992\n",
       "9993   -9993\n",
       "9994   -9994\n",
       "9995   -9995\n",
       "9996   -9996\n",
       "9997   -9997\n",
       "9998   -9998\n",
       "9999   -9999\n",
       "Length: 10000, dtype: int32"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
